package com.enation.app.web.component.navigation.plugin;

import org.springframework.stereotype.Component;

import com.enation.app.web.core.plugin.homepage.IShowPluginEvent;
import com.enation.eop.processor.core.freemarker.FreeMarkerPaser;
import com.enation.framework.plugin.AutoRegisterPlugin;

/**
 * 
 * @function 前台显示导航插件
 * @author 闯哥
 * @time 2016年11月13日 下午6:51:27
 */
@Component
public class ShowNavigationPlugin extends AutoRegisterPlugin implements
		IShowPluginEvent {

	@Override
	public String onShow(Integer state) {
		FreeMarkerPaser freeMarkerPaser = FreeMarkerPaser.getInstance();
		freeMarkerPaser.setClz(this.getClass());

		if (state == 0) {
			freeMarkerPaser.setPageName("navigation");
		} else if (state == 1) {
			freeMarkerPaser.setPageName("navigationshow");
		}

		return freeMarkerPaser.proessPageContent();
	}

}
